home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-01-14 | 1.6 KB | 54 lines | [TEXT/MPS ] |
- /* _________________________________________________________________________________________________________ //
- Copyright © 1992 Apple Computer, Inc. All rights reserved.
- Macintosh Developer Technical Support.C++ Macintosh Toolbox Framework.
- Originator: Kent Sandvik
- Date: Wednesday, June 3, 1992 10:10:46
- Revision comments are at the end of this file.
- ---
- TGDevice is a GDevice utility class, finding out GDevice information.
- GDeviceTest.cp contains the class testing functions.
- _________________________________________________________________________________________________________ */
-
- #ifndef _GDEVICE_
- #include "GDevice.h"
- #endif
-
- // This test will scan through all the GDevices on the system, and print
- // out the base address, row, and the depth size.
-
- void main(void)
- {
- Ptr aBase;
- long aRow;
- short aDepth;
-
- cout << "TGDevice test \n";
-
- // Iterate through all the screens connected to the system.
- for (TGDevice myScreens; !myScreens.Last(); myScreens.Next())
- {
- aBase = myScreens.GetBase();
- aRow = myScreens.GetRow();
- aDepth = myScreens.GetDepth();
-
- printf("Base address = %X\n", aBase);
- fflush(stdout); // cout was broken (MPW) concerning %X
- cout << "Row = " << aRow;
- cout << "\n";
- cout << "Depth = " << aDepth;
- cout << "\n";
- }
- }
-
- // _________________________________________________________________________________________________________ //
-
-
- /* Change History (most recent last):
- No Init. Date Comment
- 1 khs 6/2/92 New file
- 2 khs 7/5/92 First decent release
- 3 khs 9/7/92 Changed the structure of the classes
- */
-
-
-